import Vue from 'vue'
import Router from 'vue-router'
import ShoppingMall from '@/components/pages/shoppingmall.vue'
import Register from '@/components/pages/Register'
import Login from '@/components/pages/Login'
import Main from '@/components/pages/Main'
import Goods from '@/components/pages/Goods'
import CategoryList from '@/components/pages/CategoryList'
import Cart from '@/components/pages/Cart'
import Member from '@/components/pages/Member'
import rukou from '@/components/pages/rukou'



Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {path:'/',redirect:'/rukou'},
    {path:'/rukou',name:'rukou',component:rukou},
    {path:'/main',name:'Main',component:Main,
       children:[
         {path:'/',name:'ShoppingMall',component:ShoppingMall},
         {path:'/categoryList',name:'CategoryList',component:CategoryList},
         {path:'/Cart',name:'Cart',component:Cart},
         {path:'/Member',name:'Member',component:Member},
       ]
    },
    {path:'/register',name:'Register',component:Register},
    {path:'/login',name:'Login',component:Login},
    {path:'/goods',name:'Goods',component:Goods},

  ]
})
